#include "draw.h"

void drawCircle(int r,int lcdp[][800], int x, int y, int color)
{
    for (int i = -r; i <= r; i++)
    {
        for (int j = -r; j <= r; j++)
        {
            int new_x = x + i;
            int new_y = y + j;
            // 边界检查，确保坐标在屏幕范围内
            if (new_x >= 0 && new_x < 750 && new_y >= 0 && new_y < 480)
            {
                // 判断是否在圆形的范围内
                if (i * i + j * j < r )
                {
                    lcdp[new_y][new_x] = color;
                }
            }
        }
    }
}
